package com.ruoyi.classes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.classes.mapper.TPlanUserMapper;
import com.ruoyi.classes.domain.TPlanUser;
import com.ruoyi.classes.service.ITPlanUserService;

/**
 * 学习计划用户关联Service业务层处理
 * 
 * @author Bandit
 * @date 2022-11-01
 */
@Service
public class TPlanUserServiceImpl implements ITPlanUserService 
{
    @Autowired
    private TPlanUserMapper tPlanUserMapper;

    /**
     * 查询学习计划用户关联
     * 
     * @param planId 学习计划用户关联主键
     * @return 学习计划用户关联
     */
    @Override
    public TPlanUser selectTPlanUserByPlanId(Long planId)
    {
        return tPlanUserMapper.selectTPlanUserByPlanId(planId);
    }

    /**
     * 查询学习计划用户关联列表
     * 
     * @param tPlanUser 学习计划用户关联
     * @return 学习计划用户关联
     */
    @Override
    public List<TPlanUser> selectTPlanUserList(TPlanUser tPlanUser)
    {
        return tPlanUserMapper.selectTPlanUserList(tPlanUser);
    }

    /**
     * 新增学习计划用户关联
     * 
     * @param tPlanUser 学习计划用户关联
     * @return 结果
     */
    @Override
    public int insertTPlanUser(TPlanUser tPlanUser)
    {
        return tPlanUserMapper.insertTPlanUser(tPlanUser);
    }

    /**
     * 修改学习计划用户关联
     * 
     * @param tPlanUser 学习计划用户关联
     * @return 结果
     */
    @Override
    public int updateTPlanUser(TPlanUser tPlanUser)
    {
        return tPlanUserMapper.updateTPlanUser(tPlanUser);
    }

    /**
     * 批量删除学习计划用户关联
     * 
     * @param planIds 需要删除的学习计划用户关联主键
     * @return 结果
     */
    @Override
    public int deleteTPlanUserByPlanIds(Long[] planIds)
    {
        return tPlanUserMapper.deleteTPlanUserByPlanIds(planIds);
    }

    /**
     * 删除学习计划用户关联信息
     * 
     * @param planId 学习计划用户关联主键
     * @return 结果
     */
    @Override
    public int deleteTPlanUserByPlanId(Long planId)
    {
        return tPlanUserMapper.deleteTPlanUserByPlanId(planId);
    }
}
